1. Field of the Invention
This invention relates to oscillators for use in wireless devices, and more particularly to a method and apparatus for implementing a high-precision interval timer utilizing multiple reference oscillators including a non-optimal oscillator.
2. Description of Related Art
Timers, clocks and oscillators are essential to the performance of most modern electronic devices. Examples of devices that use clocks, oscillators and timers are commonplace. For example, digital timepieces (e.g., digital wristwatches), computers, videocassette recorders (VCRs), televisions, cordless telephones and wireless communication devices (e.g., cellular phones, pagers and Internet-enabled personal digital assistants (PDAs)) all have timers that generate internal clock signals that are used by the devices. Timers or clocks produce a desired clock rate by counting for a desired time interval. Examples of such time intervals include 1 second (i.e., operating at a 1 Hz clock rate) and 1 microsecond (.mu.sec) (i.e., operating at a 1 MHz clock rate).
Typical timers are constructed using an oscillator and at least one counter. The timer construction depends upon the desired clock rate. The clock rate depends upon the nature of the timer as used within a particular device. In some simple electronic devices timers facilitate displaying time at a desired time interval. For example, a digital wristwatch device having a desired time interval of 1 second (1 Hz clock rate) can be constructed using a 32.768 kHz oscillator that is electronically coupled to a 15-bit counter. The 15-bit counter functions in a well-known manner to "divide down" the 32.768 kHz oscillator to 1 second (i.e., the most significant bit of the 15-bit counter changes its logical state at exactly one second intervals).
In complex electronic devices such as devices that operate according to the "Bluetooth Specification", timers are used to facilitate the synchronization of timing functions between two or more wireless communication devices. The Bluetooth protocol is a global specification standard for radio communications operating at 2.4 GHz radio frequencies. Bluetooth protocol devices (i.e., those that comply with the Bluetooth Specification) replace normal cable connections through short-range radio links. Bluetooth protocol technology is featured in cordless telephony, intercom, FAX and LAN access, and dial-up networking. Bluetooth wireless communication software protocols are implemented in PDAs, cell phones, cameras, printers, and other mobile devices. Bluetooth protocol devices are described in more detail in a specification produced by the Bluetooth special interest group (SIG), entitled "Bluetooth Specification Version 1.0B", electronically available to the public via the well-known Internet at &lt;http://www.bluetooth.com/v2/document/default.asp&gt;, published in December 1999, referred to hereinbelow as the "Bluetooth Spec.", and hereby incorporated for reference herein in its entirety for its teachings on Bluetooth signals, devices and communication protocols.
One well-known method of constructing Bluetooth protocol device timers (for use in Bluetooth enabled devices) operating at clock rates of 3.2 kHz, utilizes a 32 kHz oscillator coupled to a divide-by-ten counter. One major disadvantage of utilizing a 32 kHz oscillator is the increased cost associated with the manufacture of 32 kHz oscillators when compared to the extremely high-volume manufacturing of 32.768 kHz oscillators.
When Bluetooth devices are operating on a radio channel they utilize a high-speed high-accuracy oscillator whereby the oscillator is operatively coupled to a divide-by counter. "High-accuracy" or "high-precision" oscillators are defined herein as having relatively low errors. That is, the average clock rates or signal frequencies produced by high accuracy oscillators (as averaged over a long period of time) does not vary (or varies insignificantly) from the desired or advertised clock rate. Said in another way, the clock rates generated by high accuracy oscillators as defined herein vary only very slightly from the designed clock rates. High accuracy oscillators typically have inherent errors ranging between 5-20 parts per million ("PPM"). In contrast, "low accuracy" or "low precision" oscillators are defined herein as having more significant clock error, wherein the actual clock rates generated by the oscillators vary more significantly from the desired clock rates. Low accuracy oscillators typically have inherent error ranging between 100-200 PPM.
The Bluetooth Specification, and more specifically, the Bluetooth protocol requires use of a high-speed oscillator when a device operates in an "on-the-air mode". On-the-air mode is defined herein as an operating mode wherein the Bluetooth device is in active communication with another Bluetooth device. Conversely, "sleep mode" is defined herein as an operating mode wherein the Bluetooth device is not in active communication with another Bluetooth device. During on-the-air modes, the high-speed oscillator operates as a reference for symbol rate and radio frequency (RF), and also for the Bluetooth clock. Bluetooth high-speed oscillators have a wide range of clock rates such as 2 MHz to 64 MHz. The typical clock rate speed divides evenly down into a desired clock rate such as 3.2 kHz. For example, a Bluetooth protocol device timer operating at a clock rate of 3.2 kHz can be constructed from an 8 MHz oscillator, a divide-by-250 counter, and a divide-by-10 counter. In another example, a Bluetooth protocol device timer operating at a clock rate of 3.2 kHz can be constructed from a 32 MHz oscillator, a divide-by-1000 counter, and a divide-by-10 counter. One significant disadvantage associated with using high-speed oscillators is the significant power consumed by these oscillators.
One technique for constructing Bluetooth protocol device timers that overcomes the disadvantages associated with the techniques described above (i.e., the increased cost and power consumption), makes use of non-optimal low-speed oscillators, "swallow" counters, and divide-by counters. As used herein, a "non-optimal" oscillator is defined as an oscillator that produces a clock rate that cannot be divided evenly to produce a desired clock rate (i.e., a clock rate that is not an integer multiple of a desired clock rate). An "optimal" oscillator is defined herein as an oscillator that produces a clock rate that can be evenly divided (typically by using "divide by counters") to produce a desired clock rate.
In general, and all other factors being equal, low-speed oscillators consume relatively little power. Certain low-speed oscillators are relatively inexpensive to manufacture. An example of a relatively inexpensive low-speed oscillator is a 32.768 kHz oscillator that is used in the well-known digital wristwatch industry. As one skilled in the Bluetooth design art shall appreciate, desired lower clock rates can be derived from non-optimal low-speed oscillators by selectively deleting oscillator pulses. To maintain instantaneous clock rate accuracies (i.e., to minimize jitter in the timing of clock pulses), the pulse deletions are distributed as evenly as possible over a period of time. For example, a Bluetooth protocol timer (3.2 kHz clock rate) can be constructed by relying upon the observation that a 32 kHz clock rate can be derived from a 32.768 kHz oscillator by "swallowing" (i.e., deleting) 768 pulses per second. To maintain accuracy of the timer, the pulse deletions are distributed as evenly as possible. Exactly 3 pulses need to be deleted during every 128-pulse time interval of the 32.768 kHz oscillator to obtain a desired 32 kHz clock rate. Specifically, the swallow counter counts 42 pulses of the oscillator and deletes the 43.sup.rd clock pulse; counts another 42 clock pulses and deletes the 43.sup.rd clock pulse; and finally counts 41 pulses and deletes the 42.sup.nd pulse. Accordingly, during a 128-pulse time interval (43+43+42) only 125 (42+42+41) pulses are counted by the swallow counter. A 32 kHz clock rate is thereby produced by the swallow counter. The swallow counter is operatively coupled to a divide-by-ten counter to produce a desired 3.2 kHz clock rate. One disadvantage of using non-optimal oscillators in a timer is the "jitter" that is inherently introduced by the process of swallowing clock pulses. At the time that a clock pulse is deleted, the resulting 32 kHz clock pulse train has a jitter having an interval of 2 clock periods of the 32.768 kHz oscillator.
Disadvantageously, the swallow counters used in these designs inherently produce "jitter" due to the non-optimal nature of the oscillators. Referring to the construction method described above, an oscillator pulse output generated from a 32.768 kHz oscillator is approximately 30.5176 microseconds in duration, whereas, a pulse generated from a 32.0 kHz oscillator is exactly 31.25 microseconds in duration. Thus, for every pulse counted by the swallow counter used in the above-described method, a time error linearly increases until a pulse is deleted. As such, the above-described Bluetooth protocol timer is perfectly accurate only every 125.sup.th pulse. Any other pulse during a 125-pulse period has an error of up to one pulse in duration (approximately 30.5176 .mu.sec). The error of up to 30.5176 .mu.sec can adversely affect the performance of certain functions of wireless devices, including Bluetooth devices.
Therefore, a need exists for a method and apparatus for eliminating jitter in high-precision timers utilizing non-optimal oscillators. The method and apparatus should utilize inexpensive oscillators having higher frequencies than required by the system or wireless device. Such a method should consume relatively small levels of power. Further, a need exists for a high-precision timer that does not adversely affect the performance of a device that uses the timer. The present invention provides such a high-precision timer method and apparatus.